home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / latexstyle / bk11 / DOC next >
Encoding:
Text File  |  1991-02-10  |  18.1 KB  |  435 lines

  1. % BOOK DOCUMENT STYLE -- Released 4 September 1986
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1986 by Leslie Lamport
  4.  
  5. % PREPARING A FOREIGN LANGUAGE VERSION:
  6. %
  7. % This document style is for documents prepared in the English language.
  8. % To prepare a version for another language, various English words must
  9. % be replaced.  All the English words that required replacement are
  10. % indicated below, where we give the name of the command in which the
  11. % words appear, and the entire line containing the word(s), with the
  12. % actual words underlined.
  13. % \part:
  14. %       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  15. %                ~~~~
  16. % \appendix:
  17. %   \def\@chapapp{Appendix}
  18. %                 ~~~~~~~~
  19.  
  20. %  ****************************************
  21. %  *               FONTS                  *
  22. %  ****************************************
  23. %
  24.  
  25. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  26. \normallineskip 1pt
  27. \def\baselinestretch{1}
  28.  
  29. % Each size-changing command \SIZE executes the command
  30. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  31. % where:
  32. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  33. %                  value will be \baselinestretch * BASELINESKIP.)
  34. %
  35. %  \FONTSIZE     = Name of font-size command.  The currently available
  36. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  37. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  38. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  39. %  \@FONTSIZE    = The same as the font-size command except with an
  40. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  41. %                  \@FONTSIZE = \@xivpt.
  42. %
  43. % For reasons of efficiency that needn't concern the designer,
  44. % the document style defines \@normalsize instead of \normalsize .  This is
  45. % done only for \normalsize, not for any other size-changing commands.
  46.  
  47. \def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
  48. \abovedisplayskip 11pt plus3pt minus6pt%
  49. \belowdisplayskip \abovedisplayskip
  50. \abovedisplayshortskip  \z@ plus3pt%   
  51. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt}
  52.  
  53. \def\small{\@setsize\small{12pt}\xpt\@xpt
  54. \abovedisplayskip 10pt plus2pt minus5pt%
  55. \belowdisplayskip \abovedisplayskip
  56. \abovedisplayshortskip  \z@ plus3pt%   
  57. \belowdisplayshortskip  6pt plus3pt minus3pt
  58. \def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  59. \itemsep \parsep}}
  60.  
  61. \def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
  62. \abovedisplayskip 8pt plus 2pt minus 4pt%
  63. \belowdisplayskip \abovedisplayskip
  64. \abovedisplayshortskip \z@ plus 1pt%
  65. \belowdisplayshortskip 4pt plus 2pt minus 2pt
  66. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  67. \itemsep \parsep}}
  68.  
  69. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  70. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  71. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  72. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  73. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  74. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  75. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  76.  
  77. \normalsize  % Choose the normalsize font.
  78.  
  79.  
  80. %  ****************************************
  81. %  *            PAGE LAYOUT               *
  82. %  ****************************************
  83. %
  84. % All margin dimensions measured from a point one inch from top and side
  85. % of page.  Dimensions shrink by about 2 percent
  86.  
  87. \oddsidemargin .25in      % Left margin on odd-numbered pages.
  88. \evensidemargin 1.25in      % Left margin on even-numbered pages.
  89.  
  90. \marginparwidth 1in    %   Width of marginal notes.
  91. \marginparsep 7pt        % Horizontal space between outer margin and 
  92.                          % marginal note
  93.  
  94.  
  95. % VERTICAL SPACING:        
  96.                          % Top of page:
  97. \topmargin .73in         %    Nominal distance from top of page to top of
  98.                          %    box containing running head.
  99. \headheight 12pt         %    Height of box containing running head.
  100. \headsep .275in          %    Space between running head and text.
  101. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  102.                          % Bottom of page:
  103. \footskip .38in          %    Distance from baseline of box containing foot 
  104.                          %    to baseline of last line of text.
  105.  
  106.  
  107. % DIMENSION OF TEXT:
  108. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  109. % The value of the multiplier was calculated as the floor of the
  110. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  111. % The old value of \textheight was 530.4pt.
  112. % \textheight is the height of text (including footnotes and figures, 
  113. % excluding running head and foot).
  114.  
  115. \textheight = 38\baselineskip
  116. \advance\textheight by \topskip
  117. \textwidth 5in           % Width of text line.
  118.                          % For two-column mode: 
  119. \columnsep 10pt          %    Space between columns 
  120. \columnseprule 0pt       %    Width of rule between columns.
  121.  
  122. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  123. % natural height instead of being stretched to exactly \textheight.
  124.  
  125. % FOOTNOTES:
  126.  
  127. \footnotesep 7.7pt    % Height of strut placed at the beginning of every
  128.                       % footnote = height of normal \footnotesize strut,
  129.                       % so no extra space between footnotes.
  130.  
  131. \skip\footins 10pt plus 4pt minus 2pt  % Space between last line of text and 
  132.                                        % top of first footnote.
  133.  
  134. % FLOATS: (a float is something like a figure or table)
  135. %
  136. %  FOR FLOATS ON A TEXT PAGE:
  137. %
  138. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  139. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  140.                                          % to top or bottom of text page.
  141. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  142.                                          % at top or bottom of page.
  143. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  144.                                          % text.
  145. \@maxsep 20pt                            % The maximum of \floatsep, 
  146.                                          % \textfloatsep and \intextsep (minus
  147.                                          % the stretch and shrink).
  148. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  149. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  150.                                          % figures in two-column mode.
  151. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  152.                                          % floats.
  153. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  154.                                          % \dbltexfloatsep.
  155.  
  156. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  157. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  158. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  159.                          % 0pt plus ...)                                    
  160. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  161. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  162.                          % 0pt plus ... )                                   
  163.  
  164. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  165. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  166. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  167. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  168.                          % 0pt plus ... )                                   
  169. % MARGINAL NOTES:
  170. %
  171. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  172.                          % notes.
  173.  
  174.  
  175. %  ****************************************
  176. %  *           PARAGRAPHING               *
  177. %  ****************************************
  178. %
  179. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  180. \parindent 17pt                    % Width of paragraph indentation.
  181. \topsep 9pt plus 3pt minus 5pt     % Extra vertical space, in addition to 
  182.                                    % \parskip, added above and below list and
  183.                                    % paragraphing environments.
  184. \partopsep 3pt plus 1pt minus 2pt  % Extra vertical space, in addition to 
  185.                                    % \parskip and \topsep, added when user
  186.                                    % leaves blank line before environment.
  187. \itemsep 4.5pt plus 2pt minus 1pt  % Extra vertical space, in addition to
  188.                                    % \parskip, added between list items.
  189.  
  190. % The following page-breaking penalties are defined
  191.  
  192. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  193. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  194. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  195.  
  196. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  197. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  198. \@itempenalty     -\@lowpenalty    % Between list items.
  199.  
  200. % \clubpenalty         % 'Club line'  at bottom of page.
  201. % \widowpenalty        % 'Widow line' at top of page.
  202. % \displaywidowpenalty % Math display widow line.
  203. % \predisplaypenalty   % Breaking before a math display.
  204. % \postdisplaypenalty  % Breaking after a math display.
  205. % \interlinepenalty    % Breaking at a line within a paragraph.
  206. % \brokenpenalty       % Breaking after a hyphenated line.
  207.  
  208.  
  209. %    ****************************************
  210. %    *        CHAPTERS AND SECTIONS         *
  211. %    ****************************************
  212. %
  213.  
  214. \def\part{\cleardoublepage   % Starts new page.
  215.    \thispagestyle{plain}     % Page style of part page is 'plain'
  216.   \if@twocolumn              % IF two-column style
  217.      \onecolumn              %  THEN \onecolumn
  218.      \@tempswatrue           %       @tempswa := true
  219.     \else \@tempswafalse     %  ELSE @tempswa := false
  220.   \fi                        % FI
  221.   \hbox{}\vfil               % Add fil glue to center title  
  222.   \bgroup  \centering        % BEGIN centering
  223.   \secdef\@part\@spart}     
  224.  
  225.  
  226. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  227.         \refstepcounter{part}                     %   THEN step part counter
  228.         \addcontentsline{toc}{part}{\thepart      %        add toc line
  229.         \hspace{1em}#1}\else                      %   ELSE add unnumbered line
  230.         \addcontentsline{toc}{part}{#1}\fi        % FI
  231.    \markboth{}{}
  232.     \ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  233.       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  234.     \par                             %         in \huge bold.
  235.     \vskip 20pt \fi                  %        Add space before title.
  236.     \Huge \bf                        % FI
  237.     #1\@endpart}                     % Print Title in \Huge bold.
  238.     
  239.     
  240. % \@endpart finishes the part page
  241. %
  242. \def\@endpart{\par\egroup     % END centering 
  243.    \vfil\newpage              % End page with 1fil glue.
  244.    \if@twoside                % IF twoside printing
  245.        \hbox{}                %   THEN Produce totally blank page
  246.        \thispagestyle{empty}  
  247.        \newpage        
  248.    \fi                        % FI
  249.    \if@tempswa                % IF @tempswa = true       
  250.      \twocolumn               %   THEN \twocolumn 
  251.    \fi}                       % FI
  252.  
  253. \def\@spart#1{\Huge \bf                      % Print title in \huge boldface
  254.    #1\@endpart}
  255.  
  256.  
  257. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  258. %
  259.  
  260. \def\@makechapterhead#1{             % Heading for \chapter command
  261.   \vspace*{50pt}                     % Space at top of text page.
  262.   { \parindent 0pt \raggedright 
  263.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  264.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  265.     \par 
  266.     \vskip 20pt \fi                    % Space between number and title.
  267.     \Huge \bf                        % Title.
  268.     #1\par 
  269.     \nobreak                         % TeX penalty to prevent page break.
  270.     \vskip 40pt                      % Space between title and text.
  271.   } }
  272.  
  273. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  274. %
  275.  
  276. \def\@makeschapterhead#1{             % Heading for \chapter* command
  277.   \vspace*{50pt}                     % Space at top of page.
  278.   { \parindent 0pt \raggedright 
  279.     \Huge \bf                        % Title.
  280.     #1\par 
  281.     \nobreak                         % TeX penalty to prevent page break.
  282.     \vskip 40pt                      % Space between title and text.
  283.   } }
  284.  
  285. % \secdef{UNSTARCMDS}{STARCMDS} :
  286. %    When defining a \chapter or \section command without using
  287. %    \@startsection, you can use \secdef as follows:
  288. %       \def\chapter { ... \secdef \CMDA \CMDB }
  289. %       \def\CMDA    [#1]#2{ ...   % Command to define \chapter[...]{...}
  290. %       \def\CMDB    #1{ ...       % Command to define \chapter*{...}
  291.  
  292. \def\chapter{\cleardoublepage  % Starts new right-hand page.
  293.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  294.    \global\@topnum\z@        % Prevents figures from going at top of page.
  295.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  296.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  297.  
  298. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  299.         \refstepcounter{chapter}
  300.         \typeout{\@chapapp\space\thechapter.}
  301.         \addcontentsline{toc}{chapter}{\protect
  302.         \numberline{\thechapter}#1}\else
  303.       \addcontentsline{toc}{chapter}{#1}\fi
  304.    \chaptermark{#1}
  305.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  306.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  307.    \if@twocolumn                                 % Tests for two-column mode.  
  308.            \@topnewpage[\@makechapterhead{#2}]  
  309.      \else \@makechapterhead{#2}
  310.            \@afterheading                  % Routine called after chapter and
  311.      \fi}                                  % section heading.
  312.  
  313. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  314.         \else \@makeschapterhead{#1} 
  315.               \@afterheading\fi}
  316.  
  317. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  318. %            optional * [ALTHEADING]{HEADING}
  319. %    Generic command to start a section.  
  320. %    NAME       : e.g., 'subsection'
  321. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  322. %                 section = 2, etc.  A section number will be printed if
  323. %                 and only if LEVEL < or = the value of the secnumdepth
  324. %                 counter.
  325. %    INDENT     : Indentation of heading from left margin
  326. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  327. %                 If negative, then paragraph indent of text following 
  328. %                 heading is suppressed.
  329. %    AFTERSKIP  : if positive, then skip to leave below heading,
  330. %                       else - skip to leave to right of run-in heading.
  331. %    STYLE      : commands to set style
  332. %  If '*' missing, then increments the counter.  If it is present, then
  333. %  there should be no [ALTHEADING] argument.  A sectioning command
  334. %  is normally defined to \@startsection + its first six arguments.
  335.  
  336. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  337.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  338. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  339.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  340. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  341.  -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  342. \def\paragraph{\@startsection
  343.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  344. \def\subparagraph{\@startsection
  345.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  346.      .2ex}{-1em}{\normalsize\bf}}
  347.  
  348. % Default initializations of \...mark commands.  (See below for their
  349. % us in defining page styles.
  350. %
  351.  
  352. \def\chaptermark#1{}
  353. % \def\sectionmark#1{}           % Preloaded definitions
  354. % \def\subsectionmark#1{}
  355. % \def\subsubsectionmark#1{}
  356. % \def\paragraphmark#1{}
  357. % \def\subparagraphmark#1{}
  358.  
  359. % The value of the counter secnumdepth gives the depth of the
  360. % highest-level sectioning command that is to produce section numbers.
  361. %
  362.  
  363. \setcounter{secnumdepth}{2}
  364.  
  365. % APPENDIX
  366. %
  367. % The \appendix command must do the following:
  368. %    -- reset the chapter counter to zero
  369. %    -- set \@chapapp to Appendix (for messages)
  370. %    -- redefine the chapter counter to produce appendix numbers
  371. %    -- reset the section counter to zero
  372. %    -- redefine the \chapter command if appendix titles and headings are
  373. %       to look different from chapter titles and headings.
  374.  
  375. \def\appendix{\par
  376.   \setcounter{chapter}{0}
  377.   \setcounter{section}{0}
  378.   \def\@chapapp{Appendix}
  379.   \def\thechapter{\Alph{chapter}}}
  380.  
  381.  
  382. %    ****************************************
  383. %    *                LISTS                 *
  384. %    ****************************************
  385. %
  386.  
  387. % The following commands are used to set the default values for the list
  388. % environment's parameters. See the LaTeX manual for an explanation of
  389. % the meanings of the parameters.  Defaults for the list environment are
  390. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  391. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  392. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  393. % called for a third-level list.)  By convention, \@listK should set
  394. % \leftmargin to \leftmarginK.
  395. %
  396. % For efficiency, level-one list's values are defined at top level, and
  397. % \@listi is defined to set only \leftmargin.
  398.  
  399. \leftmargini 2.5em
  400. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  401. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  402. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  403. \leftmarginv 1em
  404. \leftmarginvi 1em
  405.  
  406. \leftmargin\leftmargini
  407. \labelsep .5em
  408. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  409. \parsep 4.5pt plus 2pt minus 1pt
  410.  
  411. \def\@listi{\leftmargin\leftmargini}
  412.  
  413. \def\@listii{\leftmargin\leftmarginii
  414.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  415.    \topsep 4.5pt plus 2pt minus 1pt
  416.    \parsep 2pt plus 1pt minus 1pt
  417.    \itemsep \parsep}
  418.  
  419. \def\@listiii{\leftmargin\leftmarginiii
  420.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  421.     \topsep 2pt plus 1pt minus 1pt 
  422.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  423.     \itemsep \topsep}
  424.  
  425. \def\@listiv{\leftmargin\leftmarginiv
  426.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  427.  
  428. \def\@listv{\leftmargin\leftmarginv
  429.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  430.  
  431. \def\@listvi{\leftmargin\leftmarginvi
  432.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  433.  
  434.